import logging,yagmail
def set_log():
    logging.basicConfig(level=logging.DEBUG,format='%(lineno)d_%(levelname)s_%(name)s',handlers=[
        logging.StreamHandler(),
        logging.FileHandler('log.txt')
    ])
def send_mail(a):
    mail =yagmail.SMTP(user='2014181477@qq.com',password='dtoajwlbmzqhdchb',host='smtp.qq.com')
    mail.send(to='2014181477@qq.com',subject='测试报告',contents='测试报告',attachments=a)